home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / os20 / cli / toggleprt.lha / TogglePrt.rexx < prev    next >
OS/2 REXX Batch file  |  1980-01-04  |  842b  |  32 lines

  1. /* TogglePrt.rexx by Brian J. Cerveny
  2.  *
  3.  * Change GPFax.pre and Normal.pre to preset files of your choice.
  4.  * (See documentation for details.)
  5.  *
  6.  */
  7.  
  8. if exists('env:fax') then do
  9.         call open('File', 'ENV:fax', 'R')
  10.         fax = readch('File',1)
  11.         call close('File')
  12.  
  13.         if fax = 1 then do 
  14.                 call open('File', 'ENV:fax', 'W')
  15.                 writech('File', '0')
  16.                 say 'Loading standard printer driver'
  17.                 address command 'sys:prefs/printer from sys:prefs/presets/Normal.pre use'
  18.             end
  19.         else do
  20.                 call open('File', 'ENV:fax', 'W')
  21.                 writech('File', '1')
  22.                 say 'Loading fax driver'
  23.                 address command 'sys:prefs/printer from sys:prefs/presets/GPFax.pre use'
  24.             end
  25.     end
  26. else do
  27.         call open('File', 'ENV:fax', 'W')
  28.         writech('File', '1')
  29.         say 'Loading fax driver'
  30.         address command 'sys:prefs/printer from sys:prefs/presets/GPFax.pre use'
  31.         end
  32.